// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2004-10-16

#include "stdafx.h"
#include "thread.h"

//##ModelId=44C4B5CF0222
CJoyCriticalSection::CJoyCriticalSection()
{
    InitializeCriticalSection((CRITICAL_SECTION*)&m_cs);
}
//##ModelId=44C4B5CF0223
CJoyCriticalSection::~CJoyCriticalSection()
{
    DeleteCriticalSection((CRITICAL_SECTION*)&m_cs);
}
//##ModelId=44C4B5CF0224
void CJoyCriticalSection::Lock()
{
    EnterCriticalSection((CRITICAL_SECTION*)&m_cs);
}
//##ModelId=44C4B5CF0225
void CJoyCriticalSection::Unlock()
{
    LeaveCriticalSection((CRITICAL_SECTION*)&m_cs);
}
